#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using tl = tuple < int, int, int >;
using vec = vector < int >;
using veg = vector < pii >;

ll read() {
    ll x = 0; bool f = 0; char ch = getchar(); while(!isdigit(ch)) f |= ch == '-',ch = getchar();
    while(isdigit(ch)) x = x * 10 + (ch ^ 48),ch = getchar(); return f ? -x : x;
}

const int N = 2e5 + 10;

ll a[N];
int n;

void solve() {
	n = in; rep(i, 1, n) a[i] = in;
	ll res = a[1]; vec pos;
	rep(i, 2, n) { if(__gcd(a[i], res) < res) pos.pb(i); res = __gcd(a[i], res); }
}

int main() {
#ifndef ONLINE_JUDGE
    freopen("1.in","r",stdin);
#endif
	int T = in; while(T--) solve();
	return 0;
}
